﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartWeighMonitor.Model
{
    class QueryParamModel : BaseNotify
    {
        private string _id;

        public string id
        {
            get { return _id; }
            set { _id = value; this.DoNotify(); }
        }

        private string _timeBegin;

        public string startTime
        {
            get { return _timeBegin; }
            set { _timeBegin = value; this.DoNotify(); }
        }
        private string _timeEnd;

        public string endTime
        {
            get { return _timeEnd; }
            set { _timeEnd = value; this.DoNotify(); }
        }

        private string _timeField;

        public string timeField
        {
            get { return _timeField; }
            set { _timeField = value; this.DoNotify(); }
        }

        private string _customerName;

        public string customerName
        {
            get { return _customerName; }
            set { _customerName = value; this.DoNotify(); }
        }

        private string _personName;

        public string personName
        {
            get { return _personName; }
            set { _personName = value; this.DoNotify(); }
        }

        private string _companyName;

        public string companyName
        {
            get { return _companyName; }
            set { _companyName = value; this.DoNotify(); }
        }

        private string _billNo;

        public string billNo
        {
            get { return _billNo; }
            set { _billNo = value; this.DoNotify(); }
        }

        private string _carNumber;

        public string carNumber
        {
            get { return _carNumber; }
            set { _carNumber = value; this.DoNotify(); }
        }

        private string _saleType;

        public string saleType
        {
            get { return _saleType; }
            set { _saleType = value; this.DoNotify(); }
        }

        private string _statusGroup;

        public string statusGroup
        {
            get
            {
                string _vals = "";
                foreach (var item in _statusSelectItems)
                {
                    if (_vals != "") _vals += ",";
                    _vals += "'" + item.Value + "'";
                }
                _statusGroup = _vals;
                return _statusGroup;
            }
            set { _statusGroup = value; this.DoNotify(); }
        }


        private string _busiType;
        public string busiType
        {
            get { return _busiType; }
            set { _busiType = value; this.DoNotify(); }
        }
        private string _operation;
        public string operation
        {
            get { return _operation; }
            set { _operation = value; this.DoNotify(); }
        }

        private string _loginCorpCode;
        public string loginCorpCode
        {
            get { return _loginCorpCode; }
            set { _loginCorpCode = value; this.DoNotify(); }
        }

        private string _materialName;
        //public string materialName
        //{
        //    get { return _materialName; }
        //    set { _materialName = value; this.DoNotify(); }
        //}
        //private List<StatusInfo> _statusList;
        //public List<StatusInfo> StatusList
        //{
        //    get { return _statusList; }
        //    set { _statusList = value; this.DoNotify(); }
        //}
        //private List<TimeField> _timeFieldList;
        //public List<TimeField> TimeFieldList
        //{
        //    get { return _timeFieldList; }
        //    set { _timeFieldList = value; this.DoNotify(); }
        //}

        private string _timeStatus;
        public string timeStatus
        {
            get { return _timeStatus; }
            set { _timeStatus = value; this.DoNotify(); }
        }

        private Dictionary<string, object> _statusItems;
        public Dictionary<string, object> StatusItems
        {
            get { return _statusItems; }
            set { _statusItems = value; this.DoNotify(); }
        }
        private Dictionary<string, object> _statusSelectItems;
        public Dictionary<string, object> StatusSelectItems
        {
            get { return _statusSelectItems; }
            set { _statusSelectItems = value; this.DoNotify(); }
        }

        public QueryParamModel()
        {

            this.StatusItems = new Dictionary<string, object>();
            this.StatusItems.Add("已预约", "1");
            this.StatusItems.Add("司机登记", "24");
            this.StatusItems.Add("车辆安检", "23");
            this.StatusItems.Add("已制卡", "2");
            this.StatusItems.Add("已排队", "20");
            this.StatusItems.Add("已叫号", "21");
            this.StatusItems.Add("门禁入", "3");
            this.StatusItems.Add("称皮重", "4");
            this.StatusItems.Add("已发油", "5");
            this.StatusItems.Add("称毛重", "6");
            this.StatusItems.Add("已结算", "7");
            this.StatusItems.Add("门禁出", "8");
            this.StatusItems.Add("已过期", "9");
            this.StatusItems.Add("预约等待", "10");
            this.StatusItems.Add("已作废", "11");

            this.StatusSelectItems = new Dictionary<string, object>();
        }
    }
}
